﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.Web.Security;
using DBLibrary;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void ConvertImageButton_Click(object sender, ImageClickEventArgs e)
    {
        KeyDetail kd = PoseidonDBHelper.AdminDB.Select<KeyDetail>(new DBParam("DBPre", this.Session.GetUserDBPrefix()))[0];
        if ((kd.UsageType & KeyUsageType.Temporary) == KeyUsageType.Temporary)
        {
            this.Response.Redirect("~/masterPages/main/ChangeUserTypePage.aspx");
        }
    }
    protected void QuitLinkButton_Click(object sender, EventArgs e)
    {
        Session.RemoveUserDBPrefix();
        FormsAuthentication.SignOut();
    }
}
